package tyris.util.command;

import tyris.ui.ImageToolsPanel;

public class FlipCommand implements Command
{
    /**
     * flip direction: horizontal
     */
    public static int FLIP_HORIZONTAL = 0;

    /**
     * flip direction: vertical
     */
    public static int FLIP_VERTICAL = 1;

    /**
     * flip direction
     */
    private int direction;

    public FlipCommand(int direction)
    {
        this.direction = direction;
    }

    @Override
    public boolean execute()
    {
    	ImageToolsPanel.flip(direction);
        return true;
    }

    @Override
    public boolean undo()
    {
    	ImageToolsPanel.flip(direction);
        return true;
    }

}

